package com.destiny.controller;


import com.destiny.commons.vo.ResultVO;
import com.destiny.entity.Hero;
import com.destiny.entity.Skill;
import com.destiny.service.HeroService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author et2110
 * @since 2022-02-25
 */
@RestController
@RequestMapping("/hero")
public class HeroController {

    @Autowired
    HeroService heroService;

    @GetMapping("/name")
    public ResultVO<List<Hero>> getUser() {
        List<Hero> heroList = heroService.getHero();
        return ResultVO.success(heroList);
    }


}

